package com.warehouse.mapper;

import com.warehouse.dto.ReportWarin;
import com.warehouse.dto.Surplus;
import com.warehouse.dto.Ware;
import com.warehouse.dto.WareInfo;
import com.warehouse.entity.Warehouse;
import com.warehouse.entity.WarehouseExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface WarehouseMapper {
    long countByExample(WarehouseExample example);

    int deleteByExample(WarehouseExample example);

    int deleteByPrimaryKey(String id);

    int insert(Warehouse record);

    int insertSelective(Warehouse record);

    List<Warehouse> selectByExample(WarehouseExample example);

    Warehouse selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") Warehouse record, @Param("example") WarehouseExample example);

    int updateByExample(@Param("record") Warehouse record, @Param("example") WarehouseExample example);

    int updateByPrimaryKeySelective(Warehouse record);

    int updateByPrimaryKey(Warehouse record);

    //新增仓库
    boolean insertWare(Warehouse warehouse);

    //更新仓库
    boolean updateWare(Warehouse warehouse);

    List<Warehouse> findLikeWareNmae(String s);

    //库存清单
    List<Surplus> findProSupr();

    //可出库存
    List<Surplus> selectSurp();

    List<Surplus> findWareArea();

    //库存预警
    List<ReportWarin> findProNum();

    //库存预警的模糊搜索
    List<ReportWarin> findLikePro(@Param("s") String s);

    //查看仓库信息
    List<Warehouse> findwareInfo();

    WareInfo wareInfo(String wareName);

    List<Warehouse> findWare(Warehouse warehouse);
}